package com.softWang.system.config;

import com.softWang.common.security.auth.AuthorizeRequestsCustomizer;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
import org.springframework.stereotype.Component;

@Component
public class SystemAuthorizeRequestsCustomizer implements AuthorizeRequestsCustomizer {
    @Override
    public void customize(AuthorizeHttpRequestsConfigurer<HttpSecurity>.AuthorizationManagerRequestMatcherRegistry registry) {
        registry.antMatchers("/system/parameter/getByKey").permitAll();//系统参数查询接口，前端未登录时就需要获取一些系统配置
    }

    @Override
    public int getOrder() {
        return 0;
    }
}
